const { mongoose } = require('../module/db')

let order=mongoose.Schema({
    shop_name:String,// 商店名称
    order_state:Number,// 订单状态：已下单，制作中，正在派送，已完成
    user_state:Number,// 用户选择方式：堂食，外卖，提前预定
    shop_tel:Number,// 商店电话
    shop_id:Number,// 关联商店id
    product_list:[],// 商品列表 {name:'',img:'',num:'',price:''}
})

let orderModel=mongoose.model('order',order,'order')


module.exports={
    orderModel
}
const one = mongoose.Schema({
    yi: String,
    er: String,
    san: String,
    si: String,
})

const one1 = mongoose.Schema({
    yi: String,
    er: String,
    san: String,
    si: String,
})

const one2 = mongoose.Schema({
    yi: String,
    er: String,
    san: String,
    si: String,
})


const two = mongoose.Schema({
    yi: String,
    er: String,
    san: String,
    si: String,
})

const two1 = mongoose.Schema({
    yi: String,
    er: String,
    san: String,
    si: String,
})

const two2 = mongoose.Schema({
    yi: String,
    er: String,
    san: String,
    si: String,
})

const three = mongoose.Schema({
    yi: String,
    er: String,
    san: String,
    si: String,
})


const oneModel = mongoose.model('one', one, 'one')
const one1Model = mongoose.model('one1', one1, 'one1')
const one2Model = mongoose.model('one2', one2, 'one2')
const twoModel = mongoose.model('two', two, 'two')
const two1Model = mongoose.model('two1', two1, 'two1')
const two2Model = mongoose.model('two2', two2, 'two2')
const threeModel = mongoose.model('three', three, 'three')

module.exports = {
    oneModel,
    one1Model,
    twoModel,
    one2Model,
    twoModel,
    two1Model,
    two2Model,
    threeModel,
}